import '../app_files.dart';
class NetworkConfig {
  static const String httpUr_v1 = 'http://gas.pytylnrq.com/api/';
  static const String hostUrl = 'gas.pytylnrq.com';
  static const String imgUrl = 'http://images.pytylnrq.com/';
  static const String upLoadUrl = 'http://upload.pytylnrq.com/';
  // //
  static const String staff_HttpUrl = 'http://gis.pytylnrq.com/japi/';

  // static const String httpUr_v1 = 'http://tjdev.wisdcloud.com/api/';
  // static const String hostUrl = 'tjdev.wisdcloud.com';
  // static const String imgUrl = 'http://images.ycjklrq.com/';
  //
  // static const String staff_HttpUrl = 'http://tjgisdev.wisdcloud.com/japi/';
  // static const String staffSystem_HttpUrl =
  //     'http://tjgisdev.wisdcloud.com/system/';
  // static const String projectList_Url = 'http://61.163.139.215:9003/japi/';

  static String imageUrl(String url) {
    if (!url.startsWith('http')) {
      String imageUrl;
      if (GlobalStore.store.getState().imageUrl.isEmpty)
        imageUrl = NetworkConfig.imgUrl;
      else
        imageUrl = GlobalStore.store.getState().imageUrl;
      if (imageUrl.endsWith('/'))
        imageUrl = imageUrl + url;
      else
        imageUrl = imageUrl + '/' + url;
      print(imageUrl);
      return imageUrl;
    }
    return url;
  }
}

class WebUrlConfig {
  ///用户协议
  static const String userTipsUrl =
      'http://www.aumaria.com/mobile/about/index/id/1.html';
  static const String htmlURL = 'http://www.aumaria.com/';
}

class ShareConfig {
  static const String weChatAppID = "wx4863f14d0f3cbb07";
  static const String weChatAppSecret = "cff788226e42928bd0223f71d56e1f4d";

  static const String logoUrl = 'http://www.aumaria.com/static/image/logo.jpg';

  ///求助链接
  static const String helperPointUrl = 'http://m.aumaria.com/share/?shareUser=';
}
